package com.dk.mydemo.base;

public class ResponseEntity {
	private String status;
	private String msg;
	private Object data;
	
	
	public ResponseEntity(String status, String msg, Object data) {
		super();
		this.status = status;
		this.msg = msg;
		this.data = data;
	}
	
	public String getStatus() {
		return status;
	}
	public void setStatus(String status) {
		this.status = status;
	}
	public String getMsg() {
		return msg;
	}
	public void setMsg(String msg) {
		this.msg = msg;
	}
	public Object getData() {
		return data;
	}
	public void setData(Object data) {
		this.data = data;
	}
	
	
	
	/**
	 * 获取数据成功
	 * **/
	public static ResponseEntity successResponse(Object data){
		return new ResponseEntity("0","成功",data);
	}
	
	public static ResponseEntity successResponse(){
		return new ResponseEntity("0","成功","");
	}
	
	
	public static ResponseEntity response(String status, String msg, Object data){
		return new ResponseEntity(status, msg, data);
	}
	
	public static ResponseEntity response(String status){
		return new ResponseEntity(status, "", "");
	}

	public static ResponseEntity response(String status, String msg){
		return new ResponseEntity(status, msg,"");
	}

}
